package com.prd.controller;

import com.prd.model.EntGoal;
import com.prd.model.EntGoalStage;
import com.prd.service.EntGoalStageService;
import com.prd.util.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "目标分期")
@RestController
@RequestMapping("/api/entGoalStage")
public class EntGoalStageController extends BaseController {

    @Autowired
    private EntGoalStageService entGoalStageService;

    @ApiOperation("查询目标分期列表")
    @GetMapping("list")
    public TableDataInfo list(@ApiParam("目标ID") Long goalId) {
        startPage();
        List<EntGoalStage> list = entGoalStageService.listInfo(goalId);
        return getDataPage(list);
    }
}
